/**
 * 
 */
package facility;

import graph.NetworkPoint;
import graph.GraphNode;

import com.vividsolutions.jts.geom.Coordinate;

/**
 * @author xiaohui
 * 
 */
public class Facility extends GraphNode {

	private NetworkPoint eloc;

//	public Facility(int id, double x, double y, int edgeId,
//			double ratioFromNode, double distFromNode) {
//		super(id, x, y);
//		this.eloc = new ELocation(id, edgeId, ratioFromNode, distFromNode);
//		this.eloc = new ELocation(id, edgeId, ratioFromNode);
//	}

	public Facility(int id, double x, double y, int edgeId,
			double ratioFromNode) {
		super(id, x, y);
		this.eloc = new NetworkPoint(id, edgeId, ratioFromNode);
	}
	
	public int getEdgeId() {
		return this.eloc.getEdgeId();
	}

	public double getELocRatioFromNode() {
		return eloc.getRatioFromNode();
	}

	public void setELocRatioFromNode(double ratioFromNode) {
		eloc.setRatioFromNode(ratioFromNode);
	}

	public String toString() {
		return "FaId: " + this.getId() + " edge: " + this.getEdgeId() + " "
				+ "ratio: " + this.getELocRatioFromNode();
	}

	public NetworkPoint getEloc() {
		return this.eloc;
	}
}
